<div class="title">
  广告组件
</div>
<ng-container *ngFor="let item of selectEl.advertList;let i=index">
  <div class="label">
    广告{{i+1}}：
  </div>
  <div class="item">
    <div class="yxzadver">
      <div class="img">
        <nz-upload class="avatar-uploader" [nzAction]="uploadUrl" [nzHeaders]="headers" nzName="cover"
          nzListType="picture-card" [nzShowUploadList]="false" [nzBeforeUpload]="beforeUpload"
          (nzChange)="handleChange($event,i)">
          <ng-container *ngIf="!item.backgroundImage">
            <i class="upload-icon" nz-icon [nzType]="loading ? 'loading' : 'plus'"></i>
            <div class="ant-upload-text">Upload</div>
          </ng-container>
          <img *ngIf="item.backgroundImage" [src]="item.backgroundImage" style="width: 100%" />
        </nz-upload>
      </div>
      <div class="link">
        <textarea nz-input (ngModelChange)="save()" [(ngModel)]="item.link"></textarea>
      </div>
      <div class="remove">
        <i nz-icon nzType="delete" nzTheme="outline" (click)="delete(i)"></i>
      </div>
    </div>

  </div>

</ng-container>

<a (click)="add()">+ 添加一条广告</a>
<div class="label"></div>
<button nz-button nzType="primary" (click)="remove()" nzDanger>删除组件</button>